# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

{
    'name': 'Accounting Balance',
    'version': '1.0',
    'category': 'Accounting',
    'summary': 'Accounting Balance, Accounting Report Sheet',
    'author': 'odoowww@163.com',
    #'website': 'https://www.odoowww.com',
    'description': """
Accounting Balance
===========================================================================
专用账簿:  利润, 库存, 

结转利润 / 税处理 , 
科目余额
库存核算



2015-5-30,  1.0.2,
 balance line create and write, to set  price with amount
 move.line, add sequence
 balance.line, add sequence
 balance, add state
 balance, init open is sigle balance
 stock, add state
 
2015-5-29,  1.0.1
 move add name_cn

会计凭证 account.move:
结转利润
计算税

科目余额 account.stock
期初数初始化
查询资产负债表 / 利润表

库存核算 account.stock
库存期初数初始化
入库出库汇总，生产成本核算


account.move.line:
1. sub account with partner/product is 1st
2. sub account with journal is only used for 1002 bank
3. sub account with analytic should be careful
4. analytic_tag_ids is m2m field to reference model 'account.analytic.tag'
4. so, analytic_tag_ids to be set for some ...
5. sub account is set auto.
6. sub account is only used for report
7. date_maturity is used for 'little than one year'
8. a new function to get 'little than one year'


account.move:
1. a new field: attachment_count

account.balance.line:
1. account_id + sub_account_id
2. sub_account_id is computed by partner, product, analytic, journal
3. first, init, set type=open, debit and credit
4. second, set delta, type=delta, debit and credit is computed by account move of current month
5. third, compute close, close=open+delta
6, next month, open = last close

account.balance:
2. date field is the first day of calendar month
3. generate_balance: insert a record of this month for sum all account move line of this month
4. get_balance_sheet: account.tag,account.account,account.balance
5. get_detail_ledger: account.move + account.balance
6. get_general_ledger: account.move + account.balance, account.account.general_account
7. get_profit_sheet: account.move.line of profit journal
8. get_balance: account.balance
9. get_move_sum: account.move move_count, attachment_count
9. get_move_sum_lines: general.account debit, credit delta


account.stock

account.stock.line

    """,
    'depends': ['base','account','ow_account' ],
    'data': [
        'security/ir.model.access.csv',
        'data/account.xml',
    ],
    'demo': [
        #
        #
    ],
    'installable': True,
    'auto_install': False,
}
